/**
 * 
 */
package com.baijia.tianxiao.connect.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * @author leiruiqi
 *
 */
public enum CloseReasonEnum {

	RECONNECT_LOCAL,
	RECONNECT_OTHER,
	
	;
	
	/*private String code;
	
	public String getCode() {
		return code;
	}

	private CloseReasonEnum(String code) {
		this.code = code;
	}*/
	
	public static CloseReasonEnum getByName(String name){
		for(CloseReasonEnum reson:CloseReasonEnum.values()){
			if(StringUtils.equals(name, reson.name())){
				return reson;
			}
		}
		return null;
	}
}
